<%-- 
    Document   : Footer
    Created on : Nov 5, 2012, 2:30:28 PM
    Author     : DAT
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    String user = null;
    if (request.getParameter("logout") != null) {
        if (Boolean.parseBoolean(request.getParameter("logout").toString())) {
            session.removeAttribute("username");
        }
    }
    if (session.getAttribute("username") != null) {
        user = session.getAttribute("username").toString();
        session.setAttribute("username", user);
    }
%>
<table width="1034" align="center" border="1" bordercolor="#FFFFFF">
    <tr align="center">
        <td colspan="5" background="images/Bartop.gif">&nbsp;</td>
    </tr>
    <tr align="center">
        <td colspan="5">
            <%
                if (session.getAttribute("username") == null) {
            %>    
            <p align="right"><a style="text-decoration:none" href="Model3_TrangDangNhap.jsp"><font color="#0000FF"><strong>Đăng nhập&nbsp;&nbsp;  </strong></font></a> 
                <a style="text-decoration:none" href="Model3_TrangDangKy.jsp"><font color="#0000FF"><strong>Đăng ký&nbsp;</strong></font></a></p>                    
                    <%} else {
                    %>
            <p align="right"><a >Chào: <font color="#0000FF"><strong><%=session.getAttribute("username")%> || </strong></font></a> 

                <a style="text-decoration:none" href="Model3_TrangChu.jsp?logout=true"><font color="#0000FF"><strong>Thoát</strong></font></a></p>
                    <%}
                    %>  
    </tr>
    <tr align="center">
        <td colspan="5"><strong>@ 2012 Le Khanh Nhac </strong> <a href="#" target="_blank">Terms &amp; Privacy</a></td>
    </tr>
</table>
